<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:kml='http://earth.google.com/kml/2.1'>
	<xsl:template match="/*">
		<data>
			<xsl:apply-templates />
		</data>
	</xsl:template>

	<xsl:template match="kml:Document">
		<xsl:apply-templates select="kml:Folder" />
	</xsl:template>

	<xsl:template match="kml:Folder">
		<xsl:apply-templates select="kml:Folder" />
		<xsl:apply-templates select="kml:Placemark" />
		<xsl:apply-templates select="kml:TimeStamp" />
		<xsl:apply-templates select="kml:TimeSpan" />
	</xsl:template>

	<xsl:template match="kml:Placemark">
		<xsl:apply-templates select="kml:TimeStamp" />
		<xsl:apply-templates select="kml:TimeSpan" />
	</xsl:template>
	

	<xsl:template match="kml:TimeStamp">
	    <event start="{kml:when}" title="{../kml:name}">
			<xsl:value-of select="../kml:description" />
        </event>
	</xsl:template>
	<xsl:template match="kml:TimeSpan">
	    <event start="{kml:begin}" end="{kml:end}" title="{../kml:name}">
			<xsl:value-of select="../kml:description" />
        </event>
        <!--       isDuration="true" -->
  
	</xsl:template>	
	<xsl:template
		match=" kml:open | kml:linestring | kml:Style | kml:StyleMap | kml:Point | kml:linearring " />

</xsl:stylesheet>

